package gui.common;

public abstract class ReportCallback
{
  IView view;

  public ReportCallback(IView view)
  {
    this.view = view;
  }

  public abstract void success();

  public void failure(Exception e)
  {
    String m = e == null ? null : e.getMessage();
    view.displayErrorMessage("Building report failed!\nMessage: " + (m == null ? "none." : m));
  }

  public abstract void finished();
}
